<extend name="Public/layout"/>

<block name="body">
    <form action="__SELF__" method="post" class="form">
        <div class="form-group">
            <label class="item-label">上级菜单<span class="check-tips">（所属的上级菜单）</span></label>
            <div class="controls">
                <select name="pid" class="form-control">
                    <volist name="all_menu" id="menu">
                        <option value="{$menu.id}" 
                            <php>if($menu['id'] == $info['pid']) echo 'selected="selected"';</php> >
                            {$menu.title_show}
                        </option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">标题<span class="check-tips">（菜单标题）</span></label>
            <div class="controls">
                <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">链接<span class="check-tips">（U函数解析的URL或者外链）</span></label>
            <div class="controls">
                <input type="text" class="form-control" name="url" value="{$info.url|default=''}">
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">图标<span class="check-tips">（菜单图标）</span></label>
            <div class="controls">
                <select class="chosen-icon" name="icon" data-value="{$info.icon|default=''}"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="item-label">排序<span class="check-tips">（用于分组显示的顺序）</span></label>
            <div class="controls">
                <input type="text" class="form-control" name="sort" value="{$info.sort|default=0}">
            </div>
        </div>
        <div class="form-group">
            <input type="hidden" name="id" value="{$info.id|default=''}">
            <button class="btn btn-primary submit ajax-post" type="submit" target-form="form">确 定</button>
            <button class="btn return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>
